using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.DirectX.Direct3D;
using Microsoft.Samples.DirectX.UtilityToolkit;

namespace Noein.Control
{
    public abstract class Controller
    {
        private bool pause = false;
        public bool Pause
        {
            get { return pause; }
            set { pause = value; }
        }

        private bool loop = false;
        public bool Loop
        {
            get { return loop; }
            set { loop = value; }
        }

        // TODO object management, attach/detach function, etc
        //private List<Object> targets;

        // HACK
        //private Object target;

        //public Object Target
        //{
        //    get { return target; }
        //    set { target = value; }
        //}

        //public List<Object> Targets
        //{
        //    get { return targets; }
        //    set { targets = value; }
        //}

        //public Controller()
        //{
        //    targets = new List<Object>();
        //}

        public virtual void Reset(Object obj)
        {
            Pause = true;
        }

        public abstract void Update(Object obj, float dt);

        /// <summary>
        /// Associate given object with this controller, also make sure obj is valid for the controller.
        /// </summary>
        /// <param name="obj"></param>
        public abstract void AttachTo(Object obj);
        // TODO use callback
        //public abstract void OnFrameMove(Device device, double appTime, float elapsedTime);
    }
}
